package practice08;

import java.io.StringReader;

public class Student extends Person{
    private Klass Klass;

    public Student(int id, String name, int age, Klass Klass) {
        super(id,name,age);
        this.Klass = Klass;

    }
    private boolean isClassLeader() {
        Student classLeader =  Klass.getLeader();
        return this.equals(classLeader);
    }
    public String introduce() {
        if(Klass.getLeader() != null) {
            return super.introduce() + " I am a Student. I am Leader of " + Klass.getDisplayName() + ".";
        }else{
            return super.introduce() + " I am a Student. I am at Class "+ Klass.getNumber() +".";
        }

    }

    public Klass getKlass() {
        return Klass;
    }
}
